package com.hsj.springcloud.controller;

import com.hsj.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:Teacher黄
 * @date:Created at 2019/07/29
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public String index(){
        System.out.println("访问了");
        return "Hello SpringCloud!";
    }


    @GetMapping("/user")
    public User getUser(String userName,Integer userAge){
        User user = new User();
        user.setUserName(userName);
        user.setUserAge(userAge);
        return user;
    }






}
